<link rel="stylesheet" href="./vanui.css">
<div id="root">
  <h1>首页</h1>
  <van-nav-bar
    title="首页"
    @click-left="fatherClickLeftFn"
    @click-right="fatherClickRightFn"
  ></van-nav-bar>

  <br />
 
  <van-button title="创建" type="green" @click="fatherClickFn"></van-button>
  <van-button title="修改" type="red" @click="fatherClickFn"></van-button>

  <van-loading :show="true"></van-loading>

  <van-tips title="password" :show="true"></van-tips>

  <br /><br />

  <van-table :columns="columns1" :data="data1"></van-table>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="./vanui.js"></script>
<script>
const vm = new Vue({
    el: "#root",
    data: {
      columns1: [
        {title:'编号2', key: 'id'},
        {title:'姓名2', key: 'name'},
        {title:'年龄2', key: 'age'},
        {title:'年龄2', key: 'age'},
        {title:'年龄2', key: 'age'},
        {title:'年龄2', key: 'age'}
      ], 
      data1: [
        {id:1, name: 'hello', age: 18},
        {id:2, name: 'hello', age: 38},
        {id:1, name: 'hello', age: 18},
        {id:2, name: 'hello', age: 38},
      ]
    },
    methods: {
      fatherClickLeftFn() {
        console.log('fatherClickLeftFn')
      },
      fatherClickRightFn() {
        console.log('fatherClickRightFn')
      },
      fatherClickFn() {
        console.log('fatherClickFn')
      }
    }
})
</script>